import Vue from 'vue'
import App from './App.vue'
import './plugins/element.js'
import axios from 'axios'

Vue.config.productionTip = false

axios.defaults.baseURL = 'http://localhost:8080'
// 拦截所有请求
axios.interceptors.request.use(res => {
  res.headers.Authorization = localStorage.getItem('token')
  return res
})

Vue.prototype.$http = axios

new Vue({
  render: h => h(App),
}).$mount('#app')
